import yaml

def check_yaml_syntax(file_path):
    try:
        with open(file_path, 'r') as file:
            yaml.safe_load(file)
        print("YAML syntax is valid.")
    except Exception as e:
        print(f"Error in YAML syntax: {e}")

# Replace 'your_file.yaml' with the path to your YAML file
check_yaml_syntax('~/Downloads/project/liuli/httpfpt/httpfpt/data/test_data/test_project2/demo.yaml')
